﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Ewell.BizComponent.UI.Core
{
    public class BindingProxy : Freezable
    {
        /// <summary>Identifies the <see cref="Data"/> dependency property.</summary>
        public static readonly DependencyProperty DataProperty
            = DependencyProperty.Register(nameof(Data),
                                          typeof(object),
                                          typeof(BindingProxy));

        /// <summary>
        /// Gets or sets the real data which should be bind.
        /// </summary>
        public object? Data
        {
            get => this.GetValue(DataProperty);
            set => this.SetValue(DataProperty, value);
        }

        protected override Freezable CreateInstanceCore()
        {
            return new BindingProxy();
        }
    }
}
